3.1.37 \(\int (a+b \log (c x^n))^2 \log (d (\frac {1}{d}+f x^2)) \, dx\) [37]

Optimal. Leaf size=519 \[ 4 a b n x-8 b^2 n^2 x+4 b n (a-b n) x-\frac {4 b n (a-b n) \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+8 b^2 n x \log \left (c x^n\right )-\frac {4 b^2 n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \log \left (c x^n\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )^2-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 i b^2 n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {2 i b^2 n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {2 b^2 n^2 \text {Li}_3\left (-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 b^2 n^2 \text {Li}_3\left (\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}} \]

[Out]

4*a*b*n*x-8*b^2*n^2*x+4*b*n*(-b*n+a)*x+8*b^2*n*x*ln(c*x^n)-2*x*(a+b*ln(c*x^n))^2-2*a*b*n*x*ln(d*f*x^2+1)+2*b^2
*n^2*x*ln(d*f*x^2+1)-2*b^2*n*x*ln(c*x^n)*ln(d*f*x^2+1)+x*(a+b*ln(c*x^n))^2*ln(d*f*x^2+1)-(a+b*ln(c*x^n))^2*ln(
1-x*(-d)^(1/2)*f^(1/2))/(-d)^(1/2)/f^(1/2)+(a+b*ln(c*x^n))^2*ln(1+x*(-d)^(1/2)*f^(1/2))/(-d)^(1/2)/f^(1/2)+2*b
*n*(a+b*ln(c*x^n))*polylog(2,-x*(-d)^(1/2)*f^(1/2))/(-d)^(1/2)/f^(1/2)-2*b*n*(a+b*ln(c*x^n))*polylog(2,x*(-d)^
(1/2)*f^(1/2))/(-d)^(1/2)/f^(1/2)-2*b^2*n^2*polylog(3,-x*(-d)^(1/2)*f^(1/2))/(-d)^(1/2)/f^(1/2)+2*b^2*n^2*poly
log(3,x*(-d)^(1/2)*f^(1/2))/(-d)^(1/2)/f^(1/2)-4*b*n*(-b*n+a)*arctan(x*d^(1/2)*f^(1/2))/d^(1/2)/f^(1/2)-4*b^2*
n*arctan(x*d^(1/2)*f^(1/2))*ln(c*x^n)/d^(1/2)/f^(1/2)-2*I*b^2*n^2*polylog(2,I*x*d^(1/2)*f^(1/2))/d^(1/2)/f^(1/
2)+2*I*b^2*n^2*polylog(2,-I*x*d^(1/2)*f^(1/2))/d^(1/2)/f^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.55, antiderivative size = 519, normalized size of antiderivative = 1.00, number of steps used = 26, number of rules used = 16, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.640, Rules used = {2333, 2332, 2418, 6, 327, 209, 2393, 2361, 12, 4940, 2438, 2395, 2367, 2354, 2421, 6724} \begin {gather*} \frac {2 b n \text {PolyLog}\left (2,-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {-d} \sqrt {f}}-\frac {2 b n \text {PolyLog}\left (2,\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 i b^2 n^2 \text {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {2 i b^2 n^2 \text {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {2 b^2 n^2 \text {PolyLog}\left (3,-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 b^2 n^2 \text {PolyLog}\left (3,\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-\frac {4 b n (a-b n) \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {\log \left (1-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {-d} \sqrt {f}}+\frac {\log \left (\sqrt {-d} \sqrt {f} x+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {-d} \sqrt {f}}+x \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-2 x \left (a+b \log \left (c x^n\right )\right )^2-2 a b n x \log \left (d f x^2+1\right )+4 a b n x+4 b n x (a-b n)-\frac {4 b^2 n \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right ) \log \left (c x^n\right )}{\sqrt {d} \sqrt {f}}-2 b^2 n x \log \left (c x^n\right ) \log \left (d f x^2+1\right )+8 b^2 n x \log \left (c x^n\right )+2 b^2 n^2 x \log \left (d f x^2+1\right )-8 b^2 n^2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)],x]

[Out]

4*a*b*n*x - 8*b^2*n^2*x + 4*b*n*(a - b*n)*x - (4*b*n*(a - b*n)*ArcTan[Sqrt[d]*Sqrt[f]*x])/(Sqrt[d]*Sqrt[f]) +
8*b^2*n*x*Log[c*x^n] - (4*b^2*n*ArcTan[Sqrt[d]*Sqrt[f]*x]*Log[c*x^n])/(Sqrt[d]*Sqrt[f]) - 2*x*(a + b*Log[c*x^n
])^2 - ((a + b*Log[c*x^n])^2*Log[1 - Sqrt[-d]*Sqrt[f]*x])/(Sqrt[-d]*Sqrt[f]) + ((a + b*Log[c*x^n])^2*Log[1 + S
qrt[-d]*Sqrt[f]*x])/(Sqrt[-d]*Sqrt[f]) - 2*a*b*n*x*Log[1 + d*f*x^2] + 2*b^2*n^2*x*Log[1 + d*f*x^2] - 2*b^2*n*x
*Log[c*x^n]*Log[1 + d*f*x^2] + x*(a + b*Log[c*x^n])^2*Log[1 + d*f*x^2] + (2*b*n*(a + b*Log[c*x^n])*PolyLog[2,
-(Sqrt[-d]*Sqrt[f]*x)])/(Sqrt[-d]*Sqrt[f]) - (2*b*n*(a + b*Log[c*x^n])*PolyLog[2, Sqrt[-d]*Sqrt[f]*x])/(Sqrt[-
d]*Sqrt[f]) + ((2*I)*b^2*n^2*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x])/(Sqrt[d]*Sqrt[f]) - ((2*I)*b^2*n^2*PolyLog[2,
 I*Sqrt[d]*Sqrt[f]*x])/(Sqrt[d]*Sqrt[f]) - (2*b^2*n^2*PolyLog[3, -(Sqrt[-d]*Sqrt[f]*x)])/(Sqrt[-d]*Sqrt[f]) +
(2*b^2*n^2*PolyLog[3, Sqrt[-d]*Sqrt[f]*x])/(Sqrt[-d]*Sqrt[f])

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 2367

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2393

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2395

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2418

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[(a + b*Log[c*x^n])^p, x]}, Dist[Log[d*(e + f*x^m)^r], u, x] - Dist[f*m*r, Int[Dist[x^(m - 1)/(e +
 f*x^m), u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && IntegerQ[m]

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \, dx &=-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-(2 f) \int \left (-\frac {2 a b d n x^2}{1+d f x^2}+\frac {2 b^2 d n^2 x^2}{1+d f x^2}-\frac {2 b^2 d n x^2 \log \left (c x^n\right )}{1+d f x^2}+\frac {d x^2 \left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2}\right ) \, dx\\ &=-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-(2 f) \int \left (\frac {d \left (-2 a b n+2 b^2 n^2\right ) x^2}{1+d f x^2}-\frac {2 b^2 d n x^2 \log \left (c x^n\right )}{1+d f x^2}+\frac {d x^2 \left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2}\right ) \, dx\\ &=-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-(2 d f) \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2} \, dx+\left (4 b^2 d f n\right ) \int \frac {x^2 \log \left (c x^n\right )}{1+d f x^2} \, dx+(4 b d f n (a-b n)) \int \frac {x^2}{1+d f x^2} \, dx\\ &=4 b n (a-b n) x-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-(2 d f) \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d f}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d f \left (1+d f x^2\right )}\right ) \, dx+\left (4 b^2 d f n\right ) \int \left (\frac {\log \left (c x^n\right )}{d f}-\frac {\log \left (c x^n\right )}{d f \left (1+d f x^2\right )}\right ) \, dx-(4 b n (a-b n)) \int \frac {1}{1+d f x^2} \, dx\\ &=4 b n (a-b n) x-\frac {4 b n (a-b n) \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-2 \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx+2 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2} \, dx+\left (4 b^2 n\right ) \int \log \left (c x^n\right ) \, dx-\left (4 b^2 n\right ) \int \frac {\log \left (c x^n\right )}{1+d f x^2} \, dx\\ &=-4 b^2 n^2 x+4 b n (a-b n) x-\frac {4 b n (a-b n) \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+4 b^2 n x \log \left (c x^n\right )-\frac {4 b^2 n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \log \left (c x^n\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )^2-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+2 \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1-\sqrt {-d} \sqrt {f} x\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1+\sqrt {-d} \sqrt {f} x\right )}\right ) \, dx+(4 b n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx+\left (4 b^2 n^2\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f} x} \, dx\\ &=4 a b n x-4 b^2 n^2 x+4 b n (a-b n) x-\frac {4 b n (a-b n) \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+4 b^2 n x \log \left (c x^n\right )-\frac {4 b^2 n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \log \left (c x^n\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )^2-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\left (4 b^2 n\right ) \int \log \left (c x^n\right ) \, dx+\frac {\left (4 b^2 n^2\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}+\int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1-\sqrt {-d} \sqrt {f} x} \, dx+\int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1+\sqrt {-d} \sqrt {f} x} \, dx\\ &=4 a b n x-8 b^2 n^2 x+4 b n (a-b n) x-\frac {4 b n (a-b n) \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+8 b^2 n x \log \left (c x^n\right )-\frac {4 b^2 n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \log \left (c x^n\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )^2-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac {(2 b n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1-\sqrt {-d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {-d} \sqrt {f}}-\frac {(2 b n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\sqrt {-d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {-d} \sqrt {f}}+\frac {\left (2 i b^2 n^2\right ) \int \frac {\log \left (1-i \sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}-\frac {\left (2 i b^2 n^2\right ) \int \frac {\log \left (1+i \sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}\\ &=4 a b n x-8 b^2 n^2 x+4 b n (a-b n) x-\frac {4 b n (a-b n) \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+8 b^2 n x \log \left (c x^n\right )-\frac {4 b^2 n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \log \left (c x^n\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )^2-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 i b^2 n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {2 i b^2 n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {\left (2 b^2 n^2\right ) \int \frac {\text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {-d} \sqrt {f}}+\frac {\left (2 b^2 n^2\right ) \int \frac {\text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {-d} \sqrt {f}}\\ &=4 a b n x-8 b^2 n^2 x+4 b n (a-b n) x-\frac {4 b n (a-b n) \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+8 b^2 n x \log \left (c x^n\right )-\frac {4 b^2 n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \log \left (c x^n\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )^2-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 i b^2 n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {2 i b^2 n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-\frac {2 b^2 n^2 \text {Li}_3\left (-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 b^2 n^2 \text {Li}_3\left (\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.22, size = 544, normalized size = 1.05 \begin {gather*} \frac {-2 \sqrt {d} \sqrt {f} x \left (a^2-2 a b n+2 b^2 n^2+2 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+2 a b \left (-n \log (x)+\log \left (c x^n\right )\right )+b^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right )+2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a^2-2 a b n+2 b^2 n^2+2 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+2 a b \left (-n \log (x)+\log \left (c x^n\right )\right )+b^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right )+\sqrt {d} \sqrt {f} x \left (a^2-2 a b n+2 b^2 n^2+2 b (a-b n) \log \left (c x^n\right )+b^2 \log ^2\left (c x^n\right )\right ) \log \left (1+d f x^2\right )+2 b n \left (a-b n-b n \log (x)+b \log \left (c x^n\right )\right ) \left (-2 \sqrt {d} \sqrt {f} x (-1+\log (x))-i \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )+i \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )\right )-2 b^2 n^2 \left (\sqrt {d} \sqrt {f} x \left (2-2 \log (x)+\log ^2(x)\right )+\frac {1}{2} i \left (\log ^2(x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-2 \text {Li}_3\left (-i \sqrt {d} \sqrt {f} x\right )\right )-\frac {1}{2} i \left (\log ^2(x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )-2 \text {Li}_3\left (i \sqrt {d} \sqrt {f} x\right )\right )\right )}{\sqrt {d} \sqrt {f}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)],x]

[Out]

(-2*Sqrt[d]*Sqrt[f]*x*(a^2 - 2*a*b*n + 2*b^2*n^2 + 2*b^2*n*(n*Log[x] - Log[c*x^n]) + 2*a*b*(-(n*Log[x]) + Log[
c*x^n]) + b^2*(-(n*Log[x]) + Log[c*x^n])^2) + 2*ArcTan[Sqrt[d]*Sqrt[f]*x]*(a^2 - 2*a*b*n + 2*b^2*n^2 + 2*b^2*n
*(n*Log[x] - Log[c*x^n]) + 2*a*b*(-(n*Log[x]) + Log[c*x^n]) + b^2*(-(n*Log[x]) + Log[c*x^n])^2) + Sqrt[d]*Sqrt
[f]*x*(a^2 - 2*a*b*n + 2*b^2*n^2 + 2*b*(a - b*n)*Log[c*x^n] + b^2*Log[c*x^n]^2)*Log[1 + d*f*x^2] + 2*b*n*(a -
b*n - b*n*Log[x] + b*Log[c*x^n])*(-2*Sqrt[d]*Sqrt[f]*x*(-1 + Log[x]) - I*(Log[x]*Log[1 + I*Sqrt[d]*Sqrt[f]*x]
+ PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x]) + I*(Log[x]*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, I*Sqrt[d]*Sqrt[f]*
x])) - 2*b^2*n^2*(Sqrt[d]*Sqrt[f]*x*(2 - 2*Log[x] + Log[x]^2) + (I/2)*(Log[x]^2*Log[1 + I*Sqrt[d]*Sqrt[f]*x] +
 2*Log[x]*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x] - 2*PolyLog[3, (-I)*Sqrt[d]*Sqrt[f]*x]) - (I/2)*(Log[x]^2*Log[1 -
 I*Sqrt[d]*Sqrt[f]*x] + 2*Log[x]*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x] - 2*PolyLog[3, I*Sqrt[d]*Sqrt[f]*x])))/(Sqrt[
d]*Sqrt[f])

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \left (a +b \ln \left (c \,x^{n}\right )\right )^{2} \ln \left (d \left (\frac {1}{d}+f \,x^{2}\right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2)),x)

[Out]

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2)),x, algorithm="maxima")

[Out]

(b^2*x*log(x^n)^2 - 2*(b^2*(n - log(c)) - a*b)*x*log(x^n) + ((2*n^2 - 2*n*log(c) + log(c)^2)*b^2 - 2*a*b*(n -
log(c)) + a^2)*x)*log(d*f*x^2 + 1) - integrate(2*(b^2*d*f*x^2*log(x^n)^2 + 2*(a*b*d*f - (d*f*n - d*f*log(c))*b
^2)*x^2*log(x^n) + (a^2*d*f - 2*(d*f*n - d*f*log(c))*a*b + (2*d*f*n^2 - 2*d*f*n*log(c) + d*f*log(c)^2)*b^2)*x^
2)/(d*f*x^2 + 1), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2)),x, algorithm="fricas")

[Out]

integral(b^2*log(d*f*x^2 + 1)*log(c*x^n)^2 + 2*a*b*log(d*f*x^2 + 1)*log(c*x^n) + a^2*log(d*f*x^2 + 1), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \log {\left (c x^{n} \right )}\right )^{2} \log {\left (d f x^{2} + 1 \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*ln(d*(1/d+f*x**2)),x)

[Out]

Integral((a + b*log(c*x**n))**2*log(d*f*x**2 + 1), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2)),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*log((f*x^2 + 1/d)*d), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n))^2,x)

[Out]

int(log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n))^2, x)

________________________________________________________________________________________